<!--
 - MineAdmin is committed to providing solutions for quickly building web applications
 - Please view the LICENSE file that was distributed with this source code,
 - For the full copyright and license information.
 - Thank you very much for using MineAdmin.
 -
 - @Author X.Mo<root@imoi.cn>
 - @Link   https://gitee.com/xmo/mineadmin-vue
-->
<template>
  <div class="ma-content-block p-3 lg:h-full block lg:border-0 lg:flex justify-between">
    <!-- 使用 ma-crud 组件 -->
    <ma-form v-model="form" :columns="columnsOptions" ref="crudForm" />
  </div>
</template>
<script setup>
  import { nextTick, onMounted, ref, reactive } from 'vue'
  import commonApi from '@/api/common'
  import queueMessage from '@/api/system/queueMessage'
  
  // form 组件的 ref
  const crudForm = ref()
  // 表单数据
  const form = ref({})
  // 组件的字段设置
  const columnsOptions = reactive([
      {
          title: '预报审核通知接收人',
          dataIndex: 'ybshtz',
          formType: 'select',
          multiple:true,
          dict: {
              // 远程通用接口请求，新版代码生成都有一个 remote 接口
              remote: 'system/user/remote',
              // 指定组件接收的props
              props: { label: 'nickname', value: 'id' },
              // 开启分页
              openPage: false,
              // 远程请求配置项
              remoteOption: {
                  // 按用户名排序
                  sort: { username: 'desc' }, // 如果不指定排序方式，默认为正序排序
                  // 设置查询的字段
                  select: [ 'id', 'nickname' ],
                  // 设置数据过滤
                  filter: {
                    wx_user_type:['=',5],
                  },
                  // 关联模型
                  relations: [
                  ]
              }
          }
      },
      {
          title: '预报任务通知接收人',
          dataIndex: 'ybrwtz',
          formType: 'select',
          multiple:true,
          dict: {
              // 远程通用接口请求，新版代码生成都有一个 remote 接口
              remote: 'system/user/remote',
              // 指定组件接收的props
              props: { label: 'nickname', value: 'id' },
              // 开启分页
              openPage: false,
              // 远程请求配置项
              remoteOption: {
                  // 按用户名排序
                  sort: { username: 'desc' }, // 如果不指定排序方式，默认为正序排序
                  // 设置查询的字段
                  select: [ 'id', 'nickname' ],
                  // 设置数据过滤
                  filter: {
                    wx_user_type:['=',5],
                  },
                  // 关联模型
                  relations: [
                  ]
              }
          }
      }
  ])

</script>
<script>
export default { name: 'message' }
</script>

<style scoped lang="less">
.setBtn {
  float:right;
}
.msg-menu{
  // border-right: 1px solid var(--color-border-2);
  & li {
    border-radius: 3px; cursor: pointer; margin-bottom: 5px;
    padding: 10px; padding-left: 20px;
  }
  & li:hover, & li.active {
    background: var(--color-fill-2);
    color: rgb(var(--primary-5));
  }
}
</style>